package org.example.netty.test.nio.netty.chat.bean;

import lombok.Data;
import org.example.netty.test.nio.netty.chat.common.MessageType;

/**
 * @author zp
 * @version 1.0
 * @description: 登出的消息
 * @date 2023/4/4 19:34
 */
@Data
public class LogoutMessage extends AbsMessageBase {
    private String userName;

    @Override
    public int getMessageType() {
        return MessageType.MESSAGE_TYPE_LOG_OUT;
    }

    public static LogoutMessage build(String userName){
        LogoutMessage logoutMessage = new LogoutMessage();
        logoutMessage.setUserName(userName);
        return logoutMessage;
    }
}
